/**
 * Global token storage module
 * This module provides a singleton object to store and access the platform token
 * from anywhere in the application
 */

// Global token object that will be shared across all imports
const storeManage = {
  // The actual token value
  store: {
    token: null,
  },

  // Method to set the token
  setStore: function (storeData) {
    Object.assign(this.store, storeData);
  },

  // Method to get the token
  getStore: function () {
    return this.store;
  },
};

// Export the singleton object
module.exports = storeManage;
